<?php
ini_set('error_reporting', 'E_ALL & ~E_DEPRECATED');
require_once 'simpletest/unit_tester.php';
require_once 'simpletest/reporter.php';
require_once dirname(__FILE__) . '/../Select.php';

class SelectTest extends UnitTestCase
{
	public function Test1100()
	{
		$obj = new testselect();
		echo $obj->fetch();
	}
}

/**
 * 基底クラスを継承し、セレクトタグの属性値を設定する
 * @author admin
 *
 */
class testselect extends Form_Select
{
	public function __construct()
	{
		parent::__construct();
		/***
		 * セレクトタグの属性値設定
		 */
		$this->name = 'me';
		$this->size = '100px';
		$this->multiple = TRUE;
		$this->disabled = TRUE;
		$this->tabindex =1;
		$this->id = 'good';
		
		/***
		 * オプションタグの設定
		 */
		$objSelectOption1 = new Form_SelectOption();
		$objSelectOption1->contents = 'abc';
		$objSelectOption1->value = 1;
		
		$objSelectOption2 = new Form_SelectOption();
		$objSelectOption2->contents = 'def';
		$objSelectOption2->value = 2;
		
		$objSelectOption3 = new Form_SelectOption();
		$objSelectOption3->contents = 'ggg';
		$objSelectOption3->value = 3;
		$objSelectOption3->label = 'mine';
		$objSelectOption3->selected = TRUE;
		$objSelectOption3->disabled = TRUE;
		
		/***
		 * オプションタグをセレクトメンバーに登録
		 */
		$this->listOption[] = $objSelectOption1;
		$this->listOption[] = $objSelectOption2;
		$this->listOption[] = $objSelectOption3;
	}
}